class Person:
    def __init__(self, name, sex, age, shenhuf, pp, dcrl, sjdx, djtime, jifen):
        self.name = name
        self.sex = sex
        self.age = age
        self.shenhuf = shenhuf  # 话费余额
        self.pp = pp  # 品牌
        self.dcrl = dcrl  # 电池容量
        self.sjdx = sjdx  # 手机尺寸
        self.djtime = djtime  # 待机时间
        self.jifen = jifen  # 积分

    def send_dx(self, neirong, jieshouid):
        # 修正了打印时的参数顺序
        print(f"发送给号码: {jieshouid}，内容为: {neirong}")

    def phone(self, id, time):
        # 移除了多余的参数，这些应该使用对象自身的属性
        if len(id) < 11:
            print("抱歉您的号码是空号!!!")
        elif self.shenhuf < 1:
            print("抱歉您的话费余额不足1元,请及时充值!")
        else:
            cost = 0
            add_points = 0

            # 根据通话时间计算费用和积分，修正了迭代错误
            if 0 <= time < 10:
                cost = time * 1  # 每分钟1元
                add_points = time * 15  # 每分钟15积分
            elif 10 <= time < 20:
                cost = time * 0.8  # 每分钟0.8元
                add_points = time * 39  # 每分钟39积分
            elif time >= 20:
                cost = time * 0.65  # 每分钟0.65元
                add_points = time * 48  # 每分钟48积分

            # 更新余额和积分
            self.shenhuf -= cost
            self.jifen += add_points

            print(f"通话时长 {time} 分钟，消费 {cost} 元，获得 {add_points} 积分")
            print(f"当前余额: {self.shenhuf} 元，当前积分: {self.jifen}")

            return self.shenhuf, self.jifen


p1 = Person("张三", "男", 23, 200, "小米", "6500mh", "20*8", "48h", 0)
p2 = Person("李四", "男", 22, 10, "小米", "5500mh", "16*9", "32h", 20)

p1.send_dx("你好呀", "18393736612")  # 发送短信
p2.phone("12345678911", 28)  # 拨打电话，修正了参数数量